\(\int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx\) [1411]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 35 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=-\frac {\sqrt {-1+x}}{1+x}+\frac {\arctan \left (\frac {\sqrt {-1+x}}{\sqrt {2}}\right )}{\sqrt {2}} \]

[Out]

1/2*arctan(1/2*(-1+x)^(1/2)*2^(1/2))*2^(1/2)-(-1+x)^(1/2)/(1+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {43, 65, 209} \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\frac {\arctan \left (\frac {\sqrt {x-1}}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {\sqrt {x-1}}{x+1} \]

[In]

Int[Sqrt[-1 + x]/(1 + x)^2,x]

[Out]

-(Sqrt[-1 + x]/(1 + x)) + ArcTan[Sqrt[-1 + x]/Sqrt[2]]/Sqrt[2]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + 1))), x] - Dist[d*(n/(b*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d, n
}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, -1] &&  !IntegerQ[n] && GtQ[n, 0]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {-1+x}}{1+x}+\frac {1}{2} \int \frac {1}{\sqrt {-1+x} (1+x)} \, dx \\ & = -\frac {\sqrt {-1+x}}{1+x}+\text {Subst}\left (\int \frac {1}{2+x^2} \, dx,x,\sqrt {-1+x}\right ) \\ & = -\frac {\sqrt {-1+x}}{1+x}+\frac {\tan ^{-1}\left (\frac {\sqrt {-1+x}}{\sqrt {2}}\right )}{\sqrt {2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=-\frac {\sqrt {-1+x}}{1+x}+\frac {\arctan \left (\frac {\sqrt {-1+x}}{\sqrt {2}}\right )}{\sqrt {2}} \]

[In]

Integrate[Sqrt[-1 + x]/(1 + x)^2,x]

[Out]

-(Sqrt[-1 + x]/(1 + x)) + ArcTan[Sqrt[-1 + x]/Sqrt[2]]/Sqrt[2]

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.86

method result size
derivativedivides \(\frac {\arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}}{2}-\frac {\sqrt {-1+x}}{1+x}\) \(30\)
default \(\frac {\arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}}{2}-\frac {\sqrt {-1+x}}{1+x}\) \(30\)
risch \(\frac {\arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}}{2}-\frac {\sqrt {-1+x}}{1+x}\) \(30\)
trager \(-\frac {\sqrt {-1+x}}{1+x}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x +4 \sqrt {-1+x}+3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )}{1+x}\right )}{4}\) \(54\)

[In]

int((-1+x)^(1/2)/(1+x)^2,x,method=_RETURNVERBOSE)

[Out]

1/2*arctan(1/2*(-1+x)^(1/2)*2^(1/2))*2^(1/2)-(-1+x)^(1/2)/(1+x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.94 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\frac {\sqrt {2} {\left (x + 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) - 2 \, \sqrt {x - 1}}{2 \, {\left (x + 1\right )}} \]

[In]

integrate((-1+x)^(1/2)/(1+x)^2,x, algorithm="fricas")

[Out]

1/2*(sqrt(2)*(x + 1)*arctan(1/2*sqrt(2)*sqrt(x - 1)) - 2*sqrt(x - 1))/(x + 1)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.19 (sec) , antiderivative size = 105, normalized size of antiderivative = 3.00 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\begin {cases} \frac {\sqrt {2} i \operatorname {acosh}{\left (\frac {\sqrt {2}}{\sqrt {x + 1}} \right )}}{2} + \frac {i}{\sqrt {-1 + \frac {2}{x + 1}} \sqrt {x + 1}} - \frac {2 i}{\sqrt {-1 + \frac {2}{x + 1}} \left (x + 1\right )^{\frac {3}{2}}} & \text {for}\: \frac {1}{\left |{x + 1}\right |} > \frac {1}{2} \\- \frac {\sqrt {1 - \frac {2}{x + 1}}}{\sqrt {x + 1}} - \frac {\sqrt {2} \operatorname {asin}{\left (\frac {\sqrt {2}}{\sqrt {x + 1}} \right )}}{2} & \text {otherwise} \end {cases} \]

[In]

integrate((-1+x)**(1/2)/(1+x)**2,x)

[Out]

Piecewise((sqrt(2)*I*acosh(sqrt(2)/sqrt(x + 1))/2 + I/(sqrt(-1 + 2/(x + 1))*sqrt(x + 1)) - 2*I/(sqrt(-1 + 2/(x
 + 1))*(x + 1)**(3/2)), 1/Abs(x + 1) > 1/2), (-sqrt(1 - 2/(x + 1))/sqrt(x + 1) - sqrt(2)*asin(sqrt(2)/sqrt(x +
 1))/2, True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.83 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) - \frac {\sqrt {x - 1}}{x + 1} \]

[In]

integrate((-1+x)^(1/2)/(1+x)^2,x, algorithm="maxima")

[Out]

1/2*sqrt(2)*arctan(1/2*sqrt(2)*sqrt(x - 1)) - sqrt(x - 1)/(x + 1)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.83 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) - \frac {\sqrt {x - 1}}{x + 1} \]

[In]

integrate((-1+x)^(1/2)/(1+x)^2,x, algorithm="giac")

[Out]

1/2*sqrt(2)*arctan(1/2*sqrt(2)*sqrt(x - 1)) - sqrt(x - 1)/(x + 1)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.83 \[ \int \frac {\sqrt {-1+x}}{(1+x)^2} \, dx=\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {x-1}}{2}\right )}{2}-\frac {\sqrt {x-1}}{x+1} \]

[In]

int((x - 1)^(1/2)/(x + 1)^2,x)

[Out]

(2^(1/2)*atan((2^(1/2)*(x - 1)^(1/2))/2))/2 - (x - 1)^(1/2)/(x + 1)